
# 运算符
print(3+2)
print(3-2)
print(3*2)
print(3/2)
print(3//2)         # 去整数
print(3%2)
print(3**2)

# 2. 比较运算符
a = 6
b = 5
c = 5
e = 234560000000000
g = 234560000000000
print(a>b)
print(a==b)
print(a!=b)
print(a is b)
print(a is not b)
print("============")
print(b == c)
print(b is c)
print("==========")
print(e is g)
print(id(e),id(g))

# 3. 赋值运算符
"""
a += b      <==> a = a + b 
a -= b      <==> a = a - b
a *= b      <==> a = a * b
a /= b      <==> a = a / b
a //=b      <==> a = a // b
a %= b      <==> a = a %b
a **=b      <== > a = a**b
"""
a = 7
b = 3
a += b
print(a)
a %= b
print(a)

# 逻辑运算符
"""
逻辑与(and)  : 条件1 and 条件2 ， 两个条件都为真时返回真，否则返回假 。
逻辑或(or)     : 条件1 or 条件2  ，两个条件满足其一返回真，否则返回假 。
逻辑非(not)    : not 条件    ,条件为真，加上not变为假 ，反之变为真。
"""
m = 10
n = 5
print("===========")
print(m > 8 and n >2)
print(m>12 and n >2)

print(m>12 or n >2)
print(m>2 or n >12)

print(not m > 8)
print(not m > 18)